#pragma once
#include<stdbool.h>

typedef struct Stack{
	char data[20];
	int top;
	int size;
}Stack;

void InitStack(Stack* s)
{
	s->top = -1;
	s->size = 0;
}

void Push(Stack* s, char value)
{
	s->data[++s->top] = value;
	s->size++;
}

void Pop(Stack* s)
{
	s->top--;
	s->size--;
}

bool IsEmpty(Stack* S)
{
	if (S->size == 0)
		return true;
	else
		return false;
}

char GetTop(Stack* s)
{
	if (s->size != 0)
	{
		return s->data[s->top];
	}
	else
		return '0';
}


